package com.springboot.dto;

public class ChatContentView {
    private String selfName;
    private String otherName;
    private String otherImg;
    private String time;
    private String isRight;//true是显示在右边,表示发送方
    private String content;
    private String isImg;
    private String photoLink;

    public ChatContentView() {
    }

    public ChatContentView(String selfName, String otherName, String otherImg, String time, String isRight, String content, String isImg, String photoLink) {
        this.selfName = selfName;
        this.otherName = otherName;
        this.otherImg = otherImg;
        this.time = time;
        this.isRight = isRight;
        this.content = content;
        this.isImg = isImg;
        this.photoLink = photoLink;
    }

    public String getSelfName() {
        return selfName;
    }

    public void setSelfName(String selfName) {
        this.selfName = selfName;
    }

    public String getOtherName() {
        return otherName;
    }

    public void setOtherName(String otherName) {
        this.otherName = otherName;
    }

    public String getOtherImg() {
        return otherImg;
    }

    public void setOtherImg(String otherImg) {
        this.otherImg = otherImg;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getIsRight() {
        return isRight;
    }

    public void setIsRight(String isRight) {
        this.isRight = isRight;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getIsImg() {
        return isImg;
    }

    public void setIsImg(String isImg) {
        this.isImg = isImg;
    }

    public String getPhotoLink() {
        return photoLink;
    }

    public void setPhotoLink(String photoLink) {
        this.photoLink = photoLink;
    }

    @Override
    public String toString() {
        if(photoLink!=null)
        {
            photoLink=photoLink.replaceAll("","");
        }
        return "{" +
                "\"otherName\":\"" + otherName + '\"' +
                ",\"otherImg\":\"" + otherImg + '\"' +
                ",\"time\":\"" + time + '\"' +
                ",\"isRight\":\"" + isRight + '\"' +
                ",\"content\":\"" + content + '\"' +
                ",\"isImg\":\"" + isImg + '\"' +
                ",\"photoLink\":\"" + photoLink + '\"' +
                '}';
    }
}
